//
//  XLHTTPSessionManager.h
//  XiangLove
//
//  Created by 陈宪栋 on 2017/11/28.
//  Copyright © 2017年 BAOMIHUA.COM. All rights reserved.
//

#import <AFNetworking/AFNetworking.h>

typedef NS_ENUM(NSInteger, XLHTTPCachePloy) {
    XLHTTPCachePloy_Normal,  //先获取缓存数据,如果没有再获取服务器数据
    XLHTTPCachePloy_Server,  //获取服务器数据
    XLHTTPCachePloy_Cache    //获取缓存数据
};

typedef NS_ENUM(NSInteger, UserSex) {
    UserSex_Male,
    UserSex_Female
};

typedef NS_ENUM(NSInteger, BoundSourceType) {
    BoundSourceType_QQ = 1,
    BoundSourceType_WX = 2,
    BoundSourceType_Vistor = 6
};

@class RACSignal;
@interface XLHTTPSessionManager : AFHTTPSessionManager

+ (instancetype)sharedManager;

+ (void)attemptDealloc;
@property (nonatomic, assign) XLHTTPCachePloy cachePloy;

- (RACSignal *)POST:(NSString *)URLString parameters:(NSDictionary *)parameters resultClass:(Class)resultClass;

- (RACSignal *)XLPOST:(NSString *)URLString parameters:(NSDictionary *)parameters resultClass:(Class)resultClass;

- (RACSignal *)GET:(NSString *)URLString parameters:(NSDictionary *)parameters resultClass:(Class)resultClass;
//新版V2接口
- (RACSignal *)XLV2GET:(NSString *)URLString parameters:(NSDictionary *)parameters resultClass:(Class)resultClass;
- (RACSignal *)XLV2POST:(NSString *)URLString parameters:(NSDictionary *)parameters resultClass:(Class)resultClass;
//获取验证码
- (RACSignal *)CODEGET:(NSString *)URLString parameters:(NSDictionary *)parameters resultClass:(Class)resultClass;
//lomen接口
- (RACSignal *)LMGET:(NSString *)URLString parameters:(NSDictionary *)parameters resultClass:(Class)resultClass;

- (RACSignal *)LMPOST:(NSString *)URLString parameters:(NSDictionary *)parameters resultClass:(Class)resultClass;

//上传图片接口
+ (void)upLoadImageFileWithImage:(UIImage *)image Progress:(void (^)(id))progress Success:(void (^)(id))success Failure:(void(^)(id))failure;

- (RACSignal *)feedbackWithUserId:(NSString *)userId content:(NSString *)content;

- (RACSignal *)checkReviewStatus;


/**
 提现记录

 @param userId 用户ID
 @param year 年份
 @param month 月份
 @param page 从0开始
 @param secretKey sig
 */
- (RACSignal *)canCashOutIsAuthorizeRecordWithUserId:(NSString *)userId andYear:(int)year  andMonth:(int)month pageIndex:(int)page andSign:(NSString *)secretKey;

/**
 礼物收入明细

 @param userId 用户ID
 @param startTime 开始时间
 @param endTime 结束时间
 @param secretKey sign
 */
-(RACSignal *)getIncomeDetailsListWithUserId:(NSString *)userId startTime:(NSString *)startTime endTime:(NSString *)endTime andSign:(NSString *)secretKey;

/**
 App配置接口
 1:视频清晰度设置接口

 
 */
-(RACSignal *)getAppconfigLis;

/**
 主播发布视频上传接口

 @param userId  用户ID
 @param Title   标题
 @param Content 内容
 @param PicUrl  图片
 @param ScreenType 类型
 @param Width  视频宽
 @param Height 视频高
 @param PlayCost 视频时长
 @param secretKey sign
 */
-(RACSignal *)getPublishDynamicVideoWihtUserID:(NSString *)userId titlles:(NSString *)Title content:(NSString *)Content picUrl:(NSString *)PicUrl screenType:(NSString *)ScreenType width:(NSString *)Width height:(NSString *)Height playCost:(NSString *)PlayCost andSign:(NSString *)secretKey;

/**
 视频聊发起方扣费接口(NEW)

 @param callID 通话ID
 @param callUserID 用户ID
 @param anchorid 主播ID
 @return nil
 */
-(RACSignal *)getVideoChatDiscountD:(NSString *)callID callUserID:(NSString *)callUserID Anchorid:(NSString *)anchorid;

/**
 视频聊天挂断接口(NEW)

 @param callID 通话ID
 @param userId 用户ID
 @param anchorId 主播ID
 @param endType 类型：aType 7，正常挂断；9，余额不足挂断；12，callsdk内部心跳异常挂断；14，秀趣心跳接口异常挂断
 @return nil
 */
-(RACSignal *)getVideoChatEndCallID:(NSString *)callID userId:(NSString *)userId anchorId:(NSString *)anchorId endType:(NSString *)endType;


/**
 魅力榜数据

 @param userId 用户ID
 @return nil
 */
-(RACSignal *)getAnchorRewardUserId:(NSString *)userId;


/**
 贡献榜数据
 @param userId 用户ID
 @return nil
 */
-(RACSignal *)GetUserConsumeRankUserId:(NSString *)userId;



/**
 私聊接口开关

 @param anchorId 主播ID
 @param isLiveLanguageChat (0-关闭，1-打开)
 @return nil
 */
-(RACSignal *)getSetStatusOfAnchorLiveChatAnchorld:(NSString *)anchorId IsLive:(NSString *)isLiveLanguageChat;

/**
 我的等级信息
 @param levelNum 当前等级
 @param type 用户类型
 @return nil
 */
- (RACSignal *)getMyLevelInforWithlevelNumber:(NSString *)levelNum lesvelType:(NSString *)type;//我的等级信息

@end
